# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2021年08月19日
"""
from docx import Document


file = Document('./练习/练习3.docx')
list = [
	['姓名', '性别', '年龄'],
	['孙兴华', '男', 20],
	['赵丽颖', '女', 33],
	['李小龙', '男', 80],
	['叶问', '男', 127]
]
r = 5
c = 3
table = file.add_table(rows=r, cols=c)
for i in range(r):
	cell = table.rows[i].cells
	for j in range(c):
		cell[j].text = str(list[i][j])

file.save('./练习/07表格的添加结果.docx')


